<?php $all_session = $this->session->all_userdata(); ?>
<!DOCTYPE html>
<!-- saved from url=(0056)http://startbootstrap.com/templates/simple-sidebar.html# -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Panel</title>
<script src="<?php echo base_url();?>js/chart.js"></script>
<?php $this->load->view('panel_head');?>
</head>

<body onload="startTime()">
<?php $this->load->view('panel_header');?>
<div style="height:46px;"></div>
<div id="wrapper"> 
  
  <!-- Sidebar -->
  <div id="sidebar-wrapper">
    <?php $this->load->view('panel_sidebar');?>
  </div>
  
  <!-- Page content -->
  <div id="page-content-wrapper">
    <div class="content-header">
        <h1><span class="glyphicon glyphicon-expand"></span>&nbsp;Setting Slide &amp; News</h1>
    </div>
    <!-- Keep all page content within the page-content inset div! -->
    
    <div class="page-content inset">
       
 <div>
  
              
          <?php echo form_open('pslide/set_time');?>
      		 
             <div style="margin-left:0.7em;">
        
        <?php $j=0; ?>
         <?php if($slide == NULL) { ?>
        <div class="row">
        <div class="col-md-12" align="center">
        - No Data -
        </div>
        </div>
      	<?php } ?>
        <?php foreach($slide as $slide) { ?>
        
       
        <!-- <div class"row"> -->
        
        <div class="row" style="margin-bottom:1.5em;">
          <div class="col-md-2">
          
            <div align="center"> <img src="<?php echo base_url();?>vod_thumb/<?php echo $slide['vdo_rawfile'];?>/<?php echo $slide['thumb_name'];?>"/ width="80%"> </div>
          </div>
          
         
          <!-- <div class="col-md-2"> -->
          <div class="col-md-3" >
            <div><a href="<?php echo base_url();?>index.php/pvdo/profile/<?php echo $slide['vdo_id']; ?>"><?php echo $slide['vdo_name']; ?></a></br>
              <font size="-2"><?php echo $slide['vdo_uploadtime'];?></font></br>
              
              <!-- /pills --> 
              
            </div>
          
          </div>
          <!-- <div class="col-md-8"> -->
          
          <div class="col-md-3">
          <table width="100%">
          
          <tr height="25em" >
            <td></td>
            <td>Start</td>
            <td>:</td>
            <td><input type="text" id="start_<?php echo $slide['vdo_id'];?>" data-format="YYYY-MM-DD" data-template="D MMM YYYY" name="grant_start_<?php echo $slide['vdo_id'];?>" value="<?php if($slide['slide_start'] == NULL){ echo date("Y-m-d"); } else { echo $slide['slide_start']; }?>" required/>
            
            <input type="hidden" name="vdo_id_<?php echo $j; ?>" value="<?php echo $slide['vdo_id'];?>" />
            </td>
          </tr>
          <tr height="25em" >
            <td></td>
            <td>End</td>
            <td>:</td>
            <td><input type="text" id="end_<?php echo $slide['vdo_id'];?>" data-format="YYYY-MM-DD" data-template="D MMM YYYY" name="grant_end_<?php echo $slide['vdo_id'];?>" value="<?php if($slide['slide_end'] == NULL) { echo date("Y-m-d", mktime(date("H"), date("i")+0, date("s")+0, date("m")+0  , date("d")+30, date("Y")+0)); } else { echo $slide['slide_end']; } ?>" required /></td>
          </tr>
          <tr>
            <td colspan="4" align="right" style="padding-top:0.65em"></td>
        </table>
        <script id="js-date">
			$(function(){
				$('#start_<?php echo $slide['vdo_id'];?>').combodate();
				$('#end_<?php echo $slide['vdo_id'];?>').combodate(); 
			});
		</script>
          </div>
          
          <div class="col-md-2" style="margin-top:1em;">
          
          <?php if($slide['vdo_status'] == '') { ?>
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-right:1em"><font color="d9534f"><span class="
glyphicon glyphicon-time"></span></font></button>
            <?php } ?>
          <?php if($slide['vdo_status'] == '0') { ?>
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-right:1em"><font color="#5cb85c"><span class="glyphicon glyphicon-globe"></span></font></button>
		<?php } ?>
        	<?php if($slide['vdo_status'] == 1) { ?>
<button type="button" class="btn btn-default" data-dismiss="modal" style="margin-right:1em"><font color="f0ad4e"><span class="
glyphicon glyphicon-remove-sign"></span></font></button>
            <?php } ?>
            
           
          </div>
          <!-- <div class="col-md-3"> -->
          <div class="col-md-2">
            <table>
              <tr>
                <td><span class="
glyphicon glyphicon-stats"></span> <?php echo $slide['vdo_view'];?></td>
              </tr>
              <tr>
                <td><span class="glyphicon glyphicon-thumbs-up"></span> <?php echo $this->player_model->like($slide['vdo_id']); ?></td>
                <td><span class="glyphicon glyphicon-thumbs-down"></span> <?php echo $this->player_model->dislike($slide['vdo_id']); ?></td>
              </tr>
              <tr>
                <td><span class="glyphicon glyphicon-exclamation-sign"></span> <?php echo count($this->pvdo_model->report($slide['vdo_id']));?></td>
              </tr>
            </table>
          </div>
          <!-- <div class="col-md-3"> --> 
        </div>
        <!-- <div class"row"> -->
     	<?php $j++; } ?>   
        
     
        
      </div>
      <!-- <div margin> --> 
           
            
            
            
              <div align="right">
        <button type="submit" class="btn btn-primary">Save</button>
      </div>
            
            
            
          <?php echo form_close();?>
                 

     

           
        
  
      
      
      
      
      
      
      
    </div>
    <!-- <div class="page-content inset"> --> 
    
  </div>
  <!--  <div id="page-content-wrapper"> --> 
  </div>
</div>
<!-- <div id="wrapper"> --> 


<!-- Custom JavaScript for the Menu Toggle --> 
<script>
    $("#menu-toggle").click(function(e) {
        e.preventDefault();
        $("#wrapper").toggleClass("active");
    });
</script> 

<!-- checkbox --> 
<script>
$('#delete_all').click(function(event) {   
    if(this.checked) {
        // Iterate each checkbox
        $(':checkbox').each(function() {
            this.checked = true;                        
        });
    }else{
		$(':checkbox').each(function() {
			this.checked = false;
		});
	}
});
</script>
</body>
</html>